new GiveFlags = GetCommandFlags("give");
SetCommandFlags("give", GiveFlags & ~FCVAR_CHEAT);
find any alive survivor and execute as fakeclient command
SetCommandFlags("give", GiveFlags | FCVAR_CHEAT);


FakeClientCommand(client, "z_spawn tank");
GetAnySurvivor(){

for(new client = 1; client <= L4D2_MAXPLAYERS; client++){

if(IsValidAliveSurv(client)) return client;

}

return 0;

}


stock bool:IsValidAliveSurv(client){

if(!IsClientInGame(client)) return false;

if(!IsPlayerAlive(client)) return false;

if(GetClientTeam(client) != TEAM_SURVIVOR) return false;

return true;

}
